package com.example.demo.controller;

import com.kming.crypto.annotation.DecryptBody;
import com.kming.crypto.annotation.EncryptBody;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class TestController {
    @EncryptBody
    @DecryptBody
    @RequestMapping("/a")
    @ResponseBody
    public Map<String,Object> test(@RequestBody Map<String,Object> map){
        return map;
    }
    @RequestMapping("test")
    public String e(){
        return "test.html";
    }
}
